package com.why.model;

import java.util.ArrayList;
import java.util.List;

public class ClassInfo {

    private String freeMarkName;

    private String url;

    private String className;

    private String classDesc;

    private List<Property> properties = new ArrayList<>();

    private List<Method> methodList = new ArrayList<>();


    public static class Property {
        private String propertyDesc;
        private String permission;
        private String propertyType;
        private String propertyName;

        @Override
        public String toString() {
            return "Property{" +
                    "propertyDesc='" + propertyDesc + '\'' +
                    ", permission='" + permission + '\'' +
                    ", propertyType='" + propertyType + '\'' +
                    ", propertyName='" + propertyName + '\'' +
                    '}';
        }

        public String getPropertyDesc() {
            return propertyDesc;
        }

        public void setPropertyDesc(String propertyDesc) {
            this.propertyDesc = propertyDesc;
        }

        public String getPermission() {
            return permission;
        }

        public void setPermission(String permission) {
            this.permission = permission;
        }

        public String getPropertyType() {
            return propertyType;
        }

        public void setPropertyType(String propertyType) {
            this.propertyType = propertyType;
        }

        public String getPropertyName() {
            return propertyName;
        }

        public void setPropertyName(String propertyName) {
            this.propertyName = propertyName;
        }
    }

    public static class Method {
        private String methodDesc;
        private List<Property> inParams;
        private String outParamType;

        private String url;

        @Override
        public String toString() {
            return "Method{" +
                    "methodDesc='" + methodDesc + '\'' +
                    ", inParams=" + inParams +
                    ", outParamType='" + outParamType + '\'' +
                    ", url='" + url + '\'' +
                    '}';
        }

        public String getMethodDesc() {
            return methodDesc;
        }

        public void setMethodDesc(String methodDesc) {
            this.methodDesc = methodDesc;
        }

        public List<Property> getInParams() {
            return inParams;
        }

        public void setInParams(List<Property> inParams) {
            this.inParams = inParams;
        }

        public String getOutParamType() {
            return outParamType;
        }

        public void setOutParamType(String outParamType) {
            this.outParamType = outParamType;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    public String getFreeMarkName() {
        return freeMarkName;
    }

    public void setFreeMarkName(String freeMarkName) {
        this.freeMarkName = freeMarkName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getClassDesc() {
        return classDesc;
    }

    public void setClassDesc(String classDesc) {
        this.classDesc = classDesc;
    }

    public List<Property> getProperties() {
        return properties;
    }

    public void setProperties(List<Property> properties) {
        this.properties = properties;
    }

    public void addProperty(Property property) {
        this.properties.add(property);
    }

    public List<Method> getMethodList() {
        return methodList;
    }

    public void setMethodList(List<Method> methodList) {
        this.methodList = methodList;
    }

    public void addMethod(Method method) {
        this.methodList.add(method);
    }

    @Override
    public String toString() {
        return "ClassInfo{" +
                "freeMarkName='" + freeMarkName + '\'' +
                ", url='" + url + '\'' +
                ", className='" + className + '\'' +
                ", classDesc='" + classDesc + '\'' +
                ", properties=" + properties +
                ", methodList=" + methodList +
                '}';
    }
}
